package com.example.gobang_system.mapper;

import com.example.gobang_system.entity.Userinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2023-05-24
 * Time: 15:18
 */
@Mapper
public interface UserMapper {

    /**
     *  注册
     */
    Integer reg(Userinfo userinfo);

    /**
     *  登录
     */
    Userinfo getUserByName(@Param("username") String username);

    /**
     *  登录次数
     */
    Integer reduceLogCount(@Param("logcount") Integer logcount, @Param("id") Integer id);

    /**
     *   设置用户状态码
     */
    Integer setUserState(@Param("state") Integer state, @Param("id") Integer id);
}
